home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / TCP_IP / TNOS230S / TRACE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-30  |  2.5 KB  |  95 lines

  1. #ifndef    _TRACE_H
  2. #define    _TRACE_H
  3.  
  4. #ifndef    _MBUF_H
  5. #include "mbuf.h"
  6. #endif
  7.  
  8. #ifndef    _IFACE_H
  9. #include "iface.h"
  10. #endif
  11.  
  12. #ifndef _SOCKET_H
  13. #include "socket.h"
  14. #endif
  15.  
  16.  
  17. /* Definitions for packet dumping */
  18.  
  19. /* Table of trace subcommands */
  20. struct tracecmd {
  21.     const char *name;    /* Name of trace subcommand */
  22.     int val;        /* New setting for these bits */
  23.     int mask;        /* Mask of bits affected in trace word */
  24. };
  25.  
  26. /* List of address testing and tracing functions for each interface.
  27.  * Entries are placed in this table by conditional compilation in main.c.
  28.  */
  29. struct trace {
  30.     int (*addrtest) (struct iface *ifp,struct mbuf *bp);
  31.     void (*tracef) (FILE *,struct mbuf **,int);
  32. };
  33.  
  34. extern struct trace Tracef[];
  35.  
  36. /* In trace.c: */
  37. void dump (struct iface *ifp,int direction,unsigned type,struct mbuf *bp);
  38. void raw_dump (struct iface *ifp,int direction, struct mbuf *bp);
  39. void trace_log (struct iface *ifp,const char *fmt, ...);
  40. void shuttrace (void);
  41.  
  42. #ifdef ARCNET
  43. /* In arcdump.c: */
  44. void arc_dump (FILE *fp,struct mbuf **bpp,int check);
  45. int arc_forus (struct iface *iface,struct mbuf *bp);
  46. #endif
  47.  
  48. /* In arpdump.c: */
  49. void arp_dump (FILE *fp,struct mbuf **bpp);
  50.  
  51. /* In ax25dump.c: */
  52. void ax25_dump (FILE *fp,struct mbuf **bpp,int check);
  53. int ax_forus (struct iface *iface,struct mbuf *bp);
  54.  
  55. #ifdef ETHER
  56. /* In enetdump.c: */
  57. void ether_dump (FILE *fp,struct mbuf **bpp,int check);
  58. int ether_forus (struct iface *iface,struct mbuf *bp);
  59. #endif
  60.  
  61. /* In icmpdump.c: */
  62. void icmp_dump (FILE *fp,struct mbuf **bpp,uint32 source,uint32 dest,int check);
  63.  
  64. /* In ipdump.c: */
  65. void ip_dump (FILE *fp,struct mbuf **bpp,int check);
  66.  
  67. /* In kissdump.c: */
  68. void ki_dump (FILE *fp,struct mbuf **bpp,int check);
  69. int ki_forus (struct iface *iface,struct mbuf *bp);
  70.  
  71. /* In nrdump.c: */
  72. void netrom_dump (FILE *fp,struct mbuf **bpp,int check);
  73.  
  74. /* In pppdump.c: */
  75. void ppp_dump (FILE *fp,struct mbuf **bpp,int check);
  76.  
  77. /* In ripdump.c: */
  78. void rip_dump (FILE *fp,struct mbuf **bpp);
  79.  
  80. /* In ripdump.c: */
  81. void rspf_dump (FILE *fp,struct mbuf **bpp,uint32 source,uint32 dest,int check);
  82.  
  83. /* In slcompdump.c: */
  84. void sl_dump (FILE *fp,struct mbuf **bpp,int check);
  85. void vjcomp_dump (FILE *fp,struct mbuf **bpp,int unused);
  86.  
  87. /* In tcpdump.c: */
  88. void tcp_dump (FILE *fp,struct mbuf **bpp,uint32 source,uint32 dest,int check);
  89.  
  90. /* In udpdump.c: */
  91. void udp_dump (FILE *fp,struct mbuf **bpp,uint32 source,uint32 dest,int check);
  92.  
  93.  
  94. #endif    /* _TRACE_H */
  95.